package com.asm.repository;

import com.asm.entity.sys.ContractContain;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface ContractContainRepository extends JpaRepository<ContractContain, Long> {
    Page<ContractContain> findByContractId(Long contractId, Pageable page);

    Page<ContractContain> findBySpotId(Long spotId, Pageable page);

    @Query("select c from ContractContain c where c.isDel=false ")
    Page<ContractContain> findAll(PageRequest of);
}
